package com.dididoctor.patient.Activity.Inquiry;

import android.content.Context;
import android.content.Intent;
import android.view.View;
import android.widget.TextView;

import com.dididoctor.patient.Activity.Usercentre.Userinfo.UserInfoActivity;
import com.dididoctor.patient.MV.BaseDialog;
import com.dididoctor.patient.R;

/**
 * @version 2.0
 * @类描述：
 * @项目名称：ddgh
 * @类名称： UserinfoDialog
 * @包名称： com.dididoctor.patient.Activity.Inquiry
 * @创建人： zhanjunjie
 * @创建时间：2016/4/28 15:22
 * @修改人：
 * @修改时间：2016/4/28 15:22
 * @修改备注： new parent class(用一句话描述修改了什么)
 */
public class UserinfoDialog extends BaseDialog {
    private TextView mTvConfirm, mTvCancel, mTvPhoneNum;
    private Context context;
    private BackListenct backListenct;

    public UserinfoDialog(Context context, BackListenct backListenct) {
        super(context);
        this.context = context;
        this.backListenct = backListenct;
        setContentView(R.layout.dialog_userinfo);
        mTvConfirm = (TextView) findViewById(R.id.tv_confirm);
        mTvConfirm.setOnClickListener(this);
        mTvCancel = (TextView) findViewById(R.id.tv_cancel);
        mTvCancel.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.tv_confirm:
                Intent intent = new Intent(context, UserInfoActivity.class);
                context.startActivity(intent);
                dismiss();

                break;
            case R.id.tv_cancel:
                dismiss();
                backListenct.goback();
                break;
            default:
                break;
        }
        super.onClick(v);
    }

    interface BackListenct {
        void goback();
    }

}
